//
//  DemoModel.swift
//  TXiOSDemoApp
//
//  Created by xicheng on 16/11/21.
//  Copyright © 2016年 xicheng. All rights reserved.
//

import UIKit


class DemoServerModel:BaseModel {
  var data:DemoModel?
}


class DemoPageListServerModel:BaseModel,YYModel {
  
  open var data:BaseListModel<DemoModel>?

  
  func modelCustomTransform(from dic: [AnyHashable : Any]) -> Bool {
    if let dataList = dic["data"] as? [AnyHashable : Any]{
      self.data = BaseListModel<DemoModel>.model(with: dataList)
      self.data!.dataList = [DemoModel]()
      if let dataListArray = dataList["dataList"] as? [Any] {
        for data in dataListArray {
          if data is [AnyHashable : Any] {
            self.data!.dataList!.append(DemoModel.model(with: data as! [AnyHashable : Any])!)
          }
        }
      }
      
    }
    return true
  }
}



class DemoModel: NSObject {

  var picUrl:String?

  var picWidth:Int = 0

  var picHeight:Int = 0

  var title:String?

  var createTime:Int = 0

  var updateTime:Int = 0

}
